home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 03 Demos and Info / RE-AND.TXT < prev    next >
Encoding:
Text File  |  2019-04-13  |  3.2 KB  |  104 lines

  1.         The following is the
  2.        text of a SIG message
  3.        that I left some months
  4.        ago. The information
  5.        about the naming of the
  6.        file I now consider
  7.        questionable, so I have
  8.        enclosed it w/ square
  9.        brackets. The example
  10.        program works as
  11.        intended...It hangs up
  12.        the disk drive in an
  13.        endless loop.
  14.  
  15.   Ive been expirimenting w/ the &
  16.  command in the 1541 DOS with these
  17.  results:
  18.   (corrections welcomed!)
  19.   The "&" Cmd. may be used to execute
  20.  ML code in Disk ram from a file
  21.  stored on disk. It will autostart on
  22.  powerup in some drives, under certain
  23.  circumstances.
  24.   In my oldest 1541 the full code as
  25.  shown in Abacus Disk book is present
  26.  at disk Rom addr.s $e780-e852. The
  27.  ROM in my SX however, eliminates the
  28.  autostart portion between $e780 and
  29.  $e7a2. The & CMD part is still there,
  30.  it just wont autostart. The file to
  31.  be executed is specially structured.
  32.  *[It may be either a PRG  or USR
  33.  file, (at least). The file must have
  34.  "&" as the first character of its
  35.  name.]* The first two bytes of the
  36.  file are the the disk ram addr. where
  37.  the file is to execute. The L    t byte
  38.  is a check sum formed on all the
  39.  previous bytes (but not itsself)
  40.  equal to the remainder after their
  41.  sum is divided by 256. The third byte
  42.  is the number of following prg. bytes
  43.  , NOT including checksum byte.
  44.  Example: Consider this do-nothing 3
  45.  byte program that just loops on
  46.  itsself and executes at $0400 => JMP
  47.  $0400 . The & file would be (hex): 00
  48.  04 03 4c 00 04 5a .The disk sector
  49.  containing it would read (with the
  50.  addition of the link pointers): 00 08
  51.  00 04 03 4c 00 04 5a +bufferju    ...
  52.   If this file were named , say,
  53.  "&drivehanger" it could be executed
  54.  as follows:
  55.  open15,8,15
  56.  print#15,"&dri*"
  57.  
  58.  .. If you have trouble getting this
  59.  to work,..try making the "&" file the
  60.  first one on your disk. I am not sure
  61.  that: print#15,"&dri*" is the correct
  62.  syntax, but it does work when the "&"
  63.  file is the first.
  64.  
  65.  
  66.   In drives w/ the autostart code, the
  67.  first "&*" file on the disk will also
  68.  execute (at least w/ my equipment)
  69.  under the following conditions:
  70.  1. When connected to '64, bo     off,
  71.  then drive turned on. (oddly, it wont
  72.  work unless cord is plugged into 64.)
  73.  2. Disk ON, 64 OFF, autostart
  74.  cartridge in 64 (hes mon), 64 => ON.
  75.  (This is aparently the reason why,
  76.  when I power up w/ hes-mon pluged in,
  77.  I get disk error 'Record not present'
  78.  ! ..that allways puzzeled me!)
  79.  3. Both ON , cart. dont care, 64 =>
  80.  OFF.
  81.  4. Both ON , cart in 64, Hdw. RST
  82.  performed. (sys64738 won't do it from
  83.  basic w/ hes-mon)
  84.    Uses for this?... How about
  85.  combining w/ Spooling technique so
  86.  that an    solated drive and printer
  87.  pair could print out a disk file?..
  88.  This would need a "dead 64 simulator
  89.  cable" pluged into the disk. Or how
  90.  about an & file of several blocks w/
  91.  the last links turned to point to
  92.  first block... maybe an endless belt
  93.  repacement operating system could be
  94.  done this way? Other ideas?...
  95.  
  96.  
  97.  ..a final note: in newer drives
  98.  without the auto-start code, "&" has
  99.  little to reccomend it over the easier
  100.  to use Block-Execute Command. The
  101.  exception being that it appears that
  102.  a fi     of more than 1 block may be
  103.  executed.
  104.